#include "glib.h"
#include "hlfs.h"


int main(){
   g_print(" test init hlfs >>> \n");
   const char * uri = "local:///tmp/testenv";
   const char * fs_name = "testfs";
   struct hlfs_ctrl * ctrl = init_hlfs(uri,fs_name);
   g_assert(ctrl != NULL);
   g_print(" test  hlfs open >>> \n");
   int ret = 0;
   ret = hlfs_open(ctrl,1);
   g_assert(ret == 0);
   g_print(" test  hlfs write >>> \n");
   char content[8192*2];
   ret = hlfs_write(ctrl,content,10,10);
   g_assert(ret >0);
   g_print(" test  hlfs read >>> \n");
   ret = hlfs_read(ctrl,content,10,10);
   g_assert(ret>0);
   
}
